import type { GreasyForkElements } from '../../../../../../../../../types/constants/personalization/greasy_fork'
import {
  PAGE_ELEMENTS,
  PROJECT_PREFIX,
  SUPPORTED_PLATFORMS,
} from '../../../../../../../../../types/constants'

// 测试链接：https://greasyfork.org/zh-CN/users/364215-ricsy/notification_settings
export class NotificationSettingsPage {
  elements: GreasyForkElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GREASY_FORK]
  private static instance: NotificationSettingsPage

  /**
   * 获取单例实例
   */
  public static getInstance(): NotificationSettingsPage {
    if (!NotificationSettingsPage.instance) {
      NotificationSettingsPage.instance = new NotificationSettingsPage()
    }
    return NotificationSettingsPage.instance
  }

  init(): void {
  }

  getMainStyles(): string {
    return `
.text-content {
  h2 {
    color: var(--${PROJECT_PREFIX}-theme-text-primary) !important;
    margin-top: 0 !important;
    padding-top: 16px !important;
  }
  
  hr {
    display: none !important;
  }
}
`
  }
}
